import request from '@/utils/request'

// 查询盖章申请列表
export function listPurchaseStamp(query) {
  return request({
    url: '/oa/purchaseStamp/list',
    method: 'get',
    params: query
  })
}

// 查询盖章申请详细
export function getPurchaseStamp(id) {
  return request({
    url: '/oa/purchaseStamp/' + id,
    method: 'get'
  })
}

// 新增盖章申请
export function addPurchaseStamp(data) {
  return request({
    url: '/oa/purchaseStamp',
    method: 'post',
    data: data
  })
}

// 修改盖章申请
export function updatePurchaseStamp(data) {
  return request({
    url: '/oa/purchaseStamp',
    method: 'put',
    data: data
  })
}

// 删除盖章申请
export function delPurchaseStamp(id) {
  return request({
    url: '/oa/purchaseStamp/' + id,
    method: 'delete'
  })
}

// 获取没有盖章申请的项目信息
export function getProjectList() {
  return request({
    url: '/oa/purchaseStamp/getProjectList',
    method: 'get'
  })
}

// 通过项目名称查询盖章申请
export function queryPurchaseStampByProjectName(data) {
  return request({
    url: '/oa/purchaseStamp/queryByProjectName',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data,
  })
}
